package com.mrzhou.log.feign.fallback;

import com.mrzhou.core.tool.api.R;
import com.mrzhou.log.entity.LogApi;
import com.mrzhou.log.entity.LogError;
import com.mrzhou.log.entity.LogUsual;
import com.mrzhou.log.feign.ILogFeignClient;

public class LogFeignFallback implements ILogFeignClient {

    private R result;

    public LogFeignFallback() {
        this.result = R.fail("日志服务繁忙, 请稍后重试！");
    }

    public LogFeignFallback(R result) {
        this.result = result;
    }

    @Override
    public R<String> errorSubmit(LogError logError, String cloudAuth) {
        return result;
    }

    @Override
    public R<String> apiSubmit(LogApi logApi) {
        return result;
    }

    @Override
    public R<String> usualSubmit(LogUsual logUsual, String cloudAuth) {
        return result;
    }

}
